﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="TR_TrainingCourses_AddScore.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.TR_TrainingCourses_AddScore" %>

<%@ Register src="../Controls/user.ascx" tagname="user" tagprefix="uc1" %>

<asp:Content 
    ID="Content1" 
    runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
    <title>หลักสูตรที่เปิดอบรม</title>
    
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">        
            <script type="text/javascript">
                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }            

            </script>    
    </telerik:RadCodeBlock>
    
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="PanelB">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelB" LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>            
        </AjaxSettings>
    </telerik:RadAjaxManager>    
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None" Skin="Outlook">
    </telerik:RadAjaxLoadingPanel> 
    <asp:panel ID="PanelB" runat="server" >
        <table cellpadding="0" cellspacing="0" style="width: 994px">
            <tr>
                <td valign = "top" style="width: 1000px">                    
                    <%--<uc1:user ID="user1" runat="server" />--%>                    
                </td>
            </tr>
            <tr>
                <td style="width: 1000px">
                   <div class="moduleDivSlim1000x450">
                <div class="moduleDivBottom1000">
                    <table align="center" width="980px">
                    <tr>
                        <td align="left" class="tableHeader">
                           ผลการเข้ารับอบรม 
                        </td>
                    </tr>
                    </table>
                    <table align="center" style="width: 962px">
                    
                    <tr>
                        <td align="left" style="width: 541px">
                            <telerik:RadTreeView 
                                Visible="false"
                                ID="RadTreeView1" 
                                Runat="server" 
                                Skin="WebBlue"
                                DataFieldID="id" 
                                DataFieldParentID="parent_id"
                                DataTextField="name" 
                                DataValueField="id" 
                                OnNodeClick="RadTreeView1_NodeClick">
                            </telerik:RadTreeView>
                        </td>
                        <td align="left">                             
                            <asp:Panel ID="PanelGrid2" runat="server" Height="380px" ScrollBars="Auto" 
                                Visible="true" Width="950px">
                                <telerik:RadGrid ID="RadGrid2" runat="server" AllowAutomaticDeletes="True" 
                                    AllowFilteringByColumn="True" AllowMultiRowEdit="True" 
                                    AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True" 
                                    AutoGenerateColumns="False" EnableAJAX="True" EnableAJAXLoadingTemplate="True" 
                                    GridLines="None" Height="360px" OnItemCommand="RadGrid2_ItemCommand" 
                                    Skin="Outlook" Width="940px">
                                    <MasterTableView 
                                        AllowMultiColumnSorting="True" 
                                        CellSpacing="-1" 
                                        GroupsDefaultExpanded="true"
                                        GroupLoadMode="Client"
                                        ClientDataKeyNames="trainee_seq" 
                                        CommandItemDisplay="Top" 
                                        DataKeyNames="trainee_seq" 
                                        NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                        <CommandItemTemplate>
                                            <table width="99%">
                                                <tr>
                                                    <td align="left">
                                                        &nbsp;
                                                      <%--<asp:LinkButton ID="AddData"
                                                        runat="server" 
                                                        CommandName="AddData"
                                                        Visible="true">
                                                        <img style="border:0px;vertical-align:middle;" alt=""
                                                        src="../Images/Buttons/AddRecord.gif" /> ประเมินผลการอบรม                                                               
                                                        </asp:LinkButton>--%>  
                                                    </td>
                                                    <td align="right">
                                                    
                                                    </td>
                                                </tr>
                                            </table>
                                            
                                        </CommandItemTemplate>
                                        <GroupByExpressions>
                                            <telerik:GridGroupByExpression>
                                                <GroupByFields>
                                                    <telerik:GridGroupByField FieldName="train_seq" />
                                                </GroupByFields>
                                                <SelectFields>
                                                    <telerik:GridGroupByField FieldName="training_course_descr" HeaderText="หลักสูตร"  />
                                                </SelectFields>
                                            </telerik:GridGroupByExpression>
                                        </GroupByExpressions>
                                        <Columns>
                                     <telerik:GridTemplateColumn  
                                        HeaderStyle-Width="15px"                                                             
                                        HeaderStyle-HorizontalAlign="Center"
                                        ShowFilterIcon="false"
                                        AllowFiltering="false">                                                        
                                        <ItemTemplate>
                                            <table>
                                                <asp:ImageButton 
                                                    ID="cmdEdit" 
                                                    runat="server" 
                                                    CommandName="DataEdit"
                                                    OnClientClick="javascript: return confirm('ประเมินผล/แก้ไขรายการข้อมูลที่เลือก?');"
                                                    ImageUrl="../Images/Buttons/Edit.gif" 
                                                    ToolTip="ประเมินผล/แก้ไขรายการ" 
                                                    width="20px" />
                                            </table>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="15px" />
                                    </telerik:GridTemplateColumn>
                                            
                                <telerik:GridBoundColumn 
                                    DataField="trainee_seq" 
                                    UniqueName="trainee_seq" 
                                    Visible="false">
                                </telerik:GridBoundColumn>
                                
                                <telerik:GridBoundColumn DataField="train_seq" 
                                DataType="System.Int32" 
                                Display="False" 
                                ReadOnly="True" 
                                UniqueName="train_seq" 
                                Visible="False">
                            </telerik:GridBoundColumn>
                
                            
                                
                                <telerik:GridBoundColumn 
                                    DataField="emp_seq" 
                                    UniqueName="emp_seq" 
                                    Visible="false">
                                </telerik:GridBoundColumn>
                                
                                <telerik:GridBoundColumn DataField="FULL_NAME" HeaderText="ชื่อ-สกุล" 
                                   ShowFilterIcon="false"
                                   FilterControlWidth="100%"
                                   CurrentFilterFunction="Contains"
                                   AutoPostBackOnFilter="true"
                                   UniqueName="FULL_NAME">
                                   <HeaderStyle Wrap="False" HorizontalAlign="Center" />                                   
                                </telerik:GridBoundColumn>                               
                                
                                <telerik:GridBoundColumn DataField="result_memo" HeaderText="ความคิดเห็น" 
                                   ShowFilterIcon="false"
                                   FilterControlWidth="100%"
                                   CurrentFilterFunction="Contains"
                                   AutoPostBackOnFilter="true"
                                   UniqueName="result_memo">
                                   <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                                </telerik:GridBoundColumn>
                                
                                <telerik:GridBoundColumn DataField="T_SCORE" HeaderText="ผลการอบรม" 
                                   ShowFilterIcon="false"
                                   FilterControlWidth="100%"
                                   CurrentFilterFunction="Contains"
                                   AutoPostBackOnFilter="true"
                                   UniqueName="T_SCORE">
                                   <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="100px"/>
                                   <ItemStyle HorizontalAlign="Center"/>
                                </telerik:GridBoundColumn>
                                
                                <telerik:GridBoundColumn DataField="train_hour" HeaderText="จำนวนชั่วโมง&lt;BR&gt;ที่เข้าอบรม" 
                                   ShowFilterIcon="false"
                                   FilterControlWidth="100%"
                                   DataFormatString="{0:N0}"
                                   CurrentFilterFunction="Contains"
                                   AutoPostBackOnFilter="true"
                                   UniqueName="train_hour">
                                   <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="100px"/>
                                </telerik:GridBoundColumn>
                            </Columns>
                      
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                        <ClientSettings AllowColumnHide="True" 
                            AllowColumnsReorder="True" 
                            EnableRowHoverStyle="True" 
                            ReorderColumnsOnClient="True">
                            <Scrolling AllowScroll="true" UseStaticHeaders="True" />
                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                        </ClientSettings>
                </telerik:RadGrid>
                </asp:Panel>
                <asp:Panel ID="PanelAddData2" 
                    runat="server"
                    Height="380px"
                    Visible="false" 
                    width="956px" 
                    align="center">
                        <ul class="formList890px">
                             <li>
                                <table align="center" style="width: 748px" >
                                    <tr>
                                        <td align="left" class="tableDetailHeader" style="width: 980px">
                                            แก้ไขผลการอบรม
                                        </td>
                                    </tr>
                                </table>
                            </li>
                            <li>
                                <table style="width: 802px">
                                <tr>
                                    <td>
                                        <telerik:RadTextBox ID="txtSequence" runat="server" Visible="false" Width=" 100px"/>
                                    </td>
                                    <td>
                                        <telerik:RadTextBox ID="txtEmpSeq" runat="server" Visible="false" Width=" 100px"/>
                                    </td>
                                </tr>                                            
                                <tr>  
                                    <td align="right" style="width: 200px">
                                       ชื่อ - นามสกุล :
                                    </td>                                                 
                                    <td align="left">
                                        <asp:Label ID="lbTrainee" runat="server" Font-Bold="true">
                                        </asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                <td align="right">
                                    จำนวนชั่วโมงที่เข้าอบรม (ชั่วโมง) :
                                </td>
                                <td  align="left">
                                   <telerik:RadTextBox ID="txtTrainHour" runat="server" Width=" 80px" Text=""/>
                                </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        
                                        <telerik:RadTextBox ID="txtTrainSeq" runat="server" Visible="false" />
                                    </td> 
                                    <td align="left" colspan="2">
                                          <asp:RadioButtonList 
                                            ID="rblTrainResult" 
                                            runat="server" 
                                            AutoPostBack="true"
                                            RepeatDirection="Horizontal">
                                            <%--OnSelectedIndexChanged="rblAddPreson_SelectedIndexChanged"--%>                                       
                                            <asp:ListItem Selected="True" Value="1">ผ่านการอบรม</asp:ListItem>
                                            <asp:ListItem Value="0">ไม่ผ่านการอบรม</asp:ListItem>
                                         </asp:RadioButtonList>
                                    </td>   
                                </tr>
                                 <tr>
                                <td align="right">
                                    ความคิดเห็น :
                                </td>
                                    <td align="left">
                                        <telerik:RadTextBox ID="txtComment" runat="server" Width="400px" Height="30px"/>
                                    </td>
                                </tr>
                                </table>  
                                                                        
                                <table width="600px">
                                <tr>
                                    <td align="left">                                        
                                        <asp:Label ID="lbError1" runat="server" ForeColor="Red" Font-Size="Small" Font-Bold="true" />
                                    </td>                                     
                                </tr>                                
                                </table>
                            </li>
                        </ul>                                                                           
                      <table style="width: 646px">
                        <tr>                                    
                        <td align="right" style="width: 321px">
                            <%--<asp:Button ID="btnSave1" onclick="btnSave1_Click" runat="server" CssClass="button" Text="บันทึก" Width="80px" />--%>   
                            <asp:Button ID="btnUpdate2" onclick="btnUpdate2_Click" runat="server" CssClass="button" Text="บันทึก" Width="80px" />                         
                        </td>
                        <td align="left">
                            <asp:Button ID="btnCancel2" OnClick="btnCancel2_Click" runat="server" CssClass="button" Text="ยกเลิก" Width="80px" />
                        </td>
                        </tr>
                    </table>
                </asp:Panel>
                </td>
                    </tr>
                    </table>
            </div>
            </div>
        </td>
    </tr>
    </table> 
   </asp:panel>                     
</asp:Content>

